CC=gcc
AR=ar
STRIP=strip
RM=rm -rf
CFLAGS=-g 
LDFLAGS=
INCLUDE_DIR=-I./inc -I./
TARGET=libshine.a

OBJECTS=./data.o ./data_pool.o ./shine.o ./prot.o

all:$(OBJECTS)
	$(AR) rc  $(TARGET) $(OBJECTS)
#	$(STRIP) $(TARGET)

$(OBJECTS):%.o:%.c
	$(CC) $(CFLAGS) -c $(INCLUDE_DIR) $< -o $@

demo:
	$(CC) ./shine_server.c $(LDFLAGS) $(INCLUDE_DIR) -o shine_server -L./ -lshine -lkpf -lpthread
	$(CC) ./receiver.c $(LDFLAGS) $(INCLUDE_DIR) -o receiver -L./ -lshine -lkpf -lpthread

clean:
	$(RM) -rf $(OBJECTS)
	$(RM) -rf $(TARGET) shine_server receiver

